import Layout from "@/layout";
import top from "@/views/route/top.vue";
import bottom from "@/views/route/bottom.vue";
import vuex from "@/store/modules/vuex";
/**
注意：子菜单仅在路由children.length> = 1时出现
 *详细信息请参见：https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
 *
 *hidden：如果设置为true，则为true，则项目不会显示在边栏中（默认为false）
 * alwaysShow：如果设置为true，则将始终显示根菜单
 *如果未设置alwaysShow，则当项具有多个子路线时，
 *它将变为嵌套模式，否则不显示根菜单
 * redirect：noRedirect如果设置了noRedirect将不会在面包屑中重定向
 * name：'路由器名称'，该名称由<keep-alive>使用（必须设置！！！）
 * meta : {
    roles: ['admin','editor']    control the page roles (you can set multiple roles)
    title: 'title'               the name show in sidebar and breadcrumb (recommend set)
    icon: 'svg-name'/'el-icon-x' the icon show in the sidebar
    breadcrumb: false            if set false, the item will hidden in breadcrumb(default is true)
    activeMenu: '/example/list'  if set path, the sidebar will highlight the path you set
  }
   * meta：{
    roles：['admin'，'editor']控制页面角色（您可以设置多个角色）
    title：“ title”名称显示在侧边栏和面包屑中（推荐设置）
    icon：'svg-name'/'el-icon-x'图标显示在侧栏中
    面包屑：如果设置为false，则该项将隐藏在面包屑中（默认值为true）
    activeMenu：如果设置了路径，则为“ / example / list”，边栏将突出显示您设置的路径
  }
 */

export default [
  // {
  //   path: '/',
  //   redirect: '/jingeqianzhang'
  // },
  {
    path: "/login",
    component: () => import("@/views/login/index"),
    hidden: true
  },
  {
    path: "/",
    component: Layout,
    redirect: "/Home",
    children: [
      {
        path: "Home",
        name: "仪表盘",
        component: () => import("@/views/home/index"),
        meta: { title: "首页", icon: "dashboard" }
      }
    ]
  },
  {
    path: "/xeUtils",
    component: Layout,
    children: [
      {
        path: "index",
        name: "xeUtils",
        component: () => import("@/views/xeUtils/index"),
        meta: { title: "方法库", icon: "video" }
      }
    ]
  },
  {
    path: "/regular",
    component: Layout,
    children: [
      {
        path: "index",
        name: "regular",
        component: () => import("@/views/regular/index"),
        meta: { title: "正则表达式", icon: "video" }
      }
    ]
  },
  {
    path: "/flexLayout",
    component: Layout,
    children: [
      {
        path: "index",
        name: "flexLayout",
        component: () => import("@/views/flexLayout/index"),
        meta: { title: "flex布局", icon: "layout" }
      }
    ]
  },
  {
    path: "/video",
    component: Layout,
    children: [
      {
        path: "index",
        name: "video",
        component: () => import("@/views/video/index"),
        meta: { title: "video", icon: "layout" }
      }
    ]
  },
  {
    path: "/grid",
    component: Layout,
    children: [
      {
        path: "index",
        name: "grid",
        component: () => import("@/views/grid/index"),
        meta: { title: "grid布局", icon: "layout" }
      }
    ]
  },
  {
    path: "/xuniScroll",
    component: Layout,
    children: [
      {
        path: "index",
        name: "xuniScroll",
        component: () => import("@/views/xuniScroll/index"),
        meta: { title: "虚拟滚动", icon: "video" }
      }
    ]
  },
  {
    path: "/loginPage",
    component: Layout,
    children: [
      {
        path: "index",
        name: "loginPage",
        component: () => import("@/views/loginPage/index"),
        meta: { title: "登录页", icon: "layout" }
      }
    ]
  },
  {
    path: "/face",
    component: Layout,
    children: [
      {
        path: "index",
        name: "face",
        component: () => import("@/views/face/index"),
        meta: { title: "人脸检测", icon: "video" }
      }
    ]
  },
  {
    path: "/example",
    component: Layout,
    redirect: "/example/table",
    name: "表树例子",
    meta: { title: "表树例子", icon: "el-icon-s-help" },
    children: [
      {
        path: "table",
        name: "表",
        component: () => {
          import("@/views/table/index");
        },
        meta: { title: "Table", icon: "table" }
        // hidden: true
      },
      {
        path: "tree",
        name: "树",
        component: () => import("@/views/tree/index"),
        meta: { title: "Tree", icon: "tree" },
        children: [
          {
            path: "menu3-2-1",
            component: () => import("@/views/nested/menu1/menu1-2/menu1-2-1"),
            name: "Menu3-2-1",
            meta: { title: "Menu3-2-1" }
          },
          {
            path: "menu3-2-2",
            component: () => import("@/views/nested/menu1/menu1-2/menu1-2-1"),
            name: "Menu3-2-2",
            meta: { title: "Menu3-2-1" }
          }
        ]
      }
    ]
  },

  {
    path: "/form",
    component: Layout,
    children: [
      {
        path: "index",
        name: "表单",
        component: () => import("@/views/form/index"),
        meta: { title: "表单", icon: "form" }
      }
    ]
  },

  {
    path: "/nested",
    component: Layout,
    redirect: "/nested/menu1",
    name: "菜单",
    meta: {
      title: "菜单",
      icon: "nested"
    },
    children: [
      {
        path: "menu1",
        component: () => import("@/views/nested/menu1/index"), // Parent router-view
        name: "Menu1",
        meta: { title: "Menu1" },
        children: [
          {
            path: "menu1-1",
            component: () => import("@/views/nested/menu1/menu1-1"),
            name: "Menu1-1",
            meta: { title: "Menu1-1" }
          },
          {
            path: "menu1-2",
            component: () => import("@/views/nested/menu1/menu1-2"),
            name: "Menu1-2",
            meta: { title: "Menu1-2" },
            children: [
              {
                path: "menu1-2-1",
                component: () =>
                  import("@/views/nested/menu1/menu1-2/menu1-2-1"),
                name: "Menu1-2-1",
                meta: { title: "Menu1-2-1" }
              },
              {
                path: "menu1-2-2",
                component: () =>
                  import("@/views/nested/menu1/menu1-2/menu1-2-2"),
                name: "Menu1-2-2",
                meta: { title: "Menu1-2-2" }
              }
            ]
          },
          {
            path: "menu1-3",
            component: () => import("@/views/nested/menu1/menu1-3"),
            name: "Menu1-3",
            meta: { title: "Menu1-3" }
          }
        ]
      },
      {
        path: "menu2",
        component: () => import("@/views/nested/menu2/index"),
        name: "Menu2",
        meta: { title: "menu2" }
      }
    ]
  },

  {
    path: "external-link",
    component: Layout,
    children: [
      {
        path: "https://panjiachen.github.io/vue-element-admin-site/#/",
        meta: { title: "打开新标签", icon: "link" }
      }
    ]
  },
  {
    path: "/moment",
    component: Layout,
    children: [
      {
        path: "index",
        name: "日期处理",
        component: () => import("@/views/moment/index"),
        meta: { title: "日期处理", icon: "form" }
      }
    ]
  },
  {
    path: "/animated",
    component: Layout,
    children: [
      {
        path: "index",
        name: "animated",
        component: () => import("@/views/animated/index"),
        meta: { title: "动画", icon: "form" }
      }
    ]
  },
  {
    path: "/search",
    component: Layout,
    children: [
      {
        path: "index",
        name: "关键词搜索",
        component: () => import("@/views/search/index"),
        meta: { title: "关键词搜索", icon: "form" }
      }
    ]
  },
  {
    path: "/drawer",
    component: Layout,
    children: [
      {
        path: "index",
        name: "抽屉",
        component: () => import("@/views/drawer/drawer"),
        meta: { title: "抽屉", icon: "form" }
      }
    ]
  },
  {
    path: "/select",
    component: Layout,
    children: [
      {
        path: "index",
        name: "级联选择",
        component: () => import("@/views/select/index"),
        meta: { title: "级联选择", icon: "form" }
      },
      {
        path: "addSupplier",
        name: "添加供应商",
        component: () => import("@/views/select/addSupplier"),
        meta: { title: "添加供应商", icon: "form" },
        hidden: true
      }
    ]
  },
  {
    path: "/testcss",
    component: Layout,
    children: [
      {
        path: "index",
        name: "测试css和js",
        component: () => import("@/views/testcss"),
        meta: { title: "测试css和js", icon: "form" }
      }
    ]
  },
  {
    path: "/tree",
    component: Layout,
    children: [
      {
        path: "index",
        name: "树组件",
        component: () => import("@/views/tree"),
        meta: { title: "树组件", icon: "form" }
      }
    ]
  },
  {
    path: "/dragDialog",
    component: Layout,
    children: [
      {
        path: "index",
        name: "拖拽对话框",
        component: () => import("@/views/dragDialog/index"),
        meta: { title: "拖拽对话框", icon: "form" }
      }
    ]
  },
  {
    path: "/clipboard",
    component: Layout,
    children: [
      {
        path: "index",
        name: "剪贴板",
        component: () => import("@/views/clipboard/index"),
        meta: { title: "剪贴板", icon: "form" }
      }
    ]
  },
  {
    path: "/richText",
    component: Layout,
    name: "富文本",
    meta: { title: "富文本", icon: "form" },
    children: [
      {
        path: "uEdit",
        name: "uEdit",
        component: () => import("@/views/richText/uEdit"),
        meta: { title: "uEdit", icon: "form" }
      },
      {
        path: "index",
        name: "quillEditor",
        component: () => import("@/views/richText/index"),
        meta: { title: "quillEditor", icon: "form" }
      },
      {
        path: "wand",
        name: "wandEdit",
        component: () => import("@/views/richText/wandEditor"),
        meta: { title: "wandEdit", icon: "form" }
      }
    ]
  },
  {
    path: "/testjs",
    component: Layout,
    children: [
      {
        path: "index",
        name: "处理数组对象",
        component: () => import("@/views/testjs/index"),
        meta: { title: "处理数组对象", icon: "form" }
      }
    ]
  },
  {
    path: "/filters",
    component: Layout,
    children: [
      {
        path: "index",
        name: "过滤器",
        component: () => import("@/views/filter/index"),
        meta: { title: "过滤器", icon: "form" }
      }
    ]
  },
  {
    path: "/slot",
    component: Layout,
    children: [
      {
        path: "index",
        name: "插槽",
        component: () => import("@/views/slot/index"),
        meta: { title: "插槽", icon: "form" }
      }
    ]
  },
  {
    path: "/export",
    component: Layout,
    children: [
      {
        path: "index",
        name: "导入导出",
        component: () => import("@/views/export/index"),
        meta: { title: "导入导出", icon: "form" }
      }
    ]
  },
  {
    path: "/scroll",
    component: Layout,
    children: [
      {
        path: "index",
        name: "滚动条",
        component: () => import("@/views/scroll/index"),
        meta: { title: "滚动条", icon: "form" }
      }
    ]
  },
  {
    path: "/vuex",
    component: Layout,
    children: [
      {
        path: "index",
        name: "vuex",
        component: () => import("@/views/vuex/index"),
        meta: { title: "vuex", icon: "form" }
      }
    ]
  },
  {
    path: "/route",
    component: Layout,
    children: [
      {
        path: "index",
        name: "route",
        component: () => import("@/views/route/index"),
        meta: { title: "route", icon: "form" }
      },
      {
        path: "detail/:id",
        name: "detail",
        component: () => import("@/views/route/detail"),
        hidden: true
      }
    ]
  },
  {
    path: "/css",
    component: Layout,
    children: [
      {
        path: "index",
        name: "css",
        component: () => import("@/views/css/index"),
        meta: { title: "css", icon: "form" }
      }
    ]
  },
  {
    path: "/flex",
    component: Layout,
    children: [
      {
        path: "index",
        name: "flex",
        component: () => import("@/views/flex/index"),
        meta: { title: "flexbox", icon: "form" }
      }
    ]
  },
  {
    path: "/request",
    component: Layout,
    children: [
      {
        path: "index",
        name: "request",
        component: () => import("@/views/request/index"),
        meta: { title: "测试axios", icon: "form" }
      }
    ]
  },
  {
    path: "/DarkModelPage",
    component: Layout,
    children: [
      {
        path: "index",
        name: "DarkModelPage",
        component: () => import("@/views/DarkModelPage/DarkModelPage"),
        meta: { title: "黑夜白天", icon: "form" }
      }
    ]
  },
  {
    path: "/scroll2",
    component: Layout,
    children: [
      {
        path: "index",
        name: "scroll2",
        component: () => import("@/views/scroll2/index"),
        meta: { title: "scroll2", icon: "form" }
      }
    ]
  },
  {
    path: "/leetCode",
    component: Layout,
    children: [
      {
        path: "index",
        name: "leetCode",
        component: () => import("@/views/leetCode/index"),
        meta: { title: "leetCode", icon: "form" }
      }
    ]
  },
  {
    path: "/skeleton",
    component: Layout,
    children: [
      {
        path: "index",
        name: "skeleton",
        component: () => import("@/views/skeleton/index"),
        meta: { title: "骨架屏", icon: "form" }
      }
    ]
  },
  {
    path: "/pdf",
    component: Layout,
    children: [
      {
        path: "index",
        name: "pdf",
        component: () => import("@/views/pdf/index"),
        meta: { title: "pdf", icon: "form" }
      }
    ]
  },
  {
    path: "/numFlop",
    component: Layout,
    children: [
      {
        path: "index",
        name: "numFlop",
        component: () => import("@/views/numFlop/index"),
        meta: { title: "数字翻牌", icon: "form" }
      }
    ]
  },
  {
    path: "/ref",
    component: Layout,
    children: [
      {
        path: "index",
        name: "ref",
        component: () => import("@/views/ref/index"),
        meta: { title: "ref和图片vw的使用", icon: "form" }
      }
    ]
  },
  {
    path: "/createComponents",
    component: Layout,
    children: [
      {
        path: "index",
        name: "createComponents",
        component: () => import("@/views/createComponent/index"),
        meta: { title: "封装全局组件", icon: "form" }
      }
    ]
  },
  {
    path: "/zkxUi",
    component: Layout,
    children: [
      {
        path: "index",
        name: "zkxUi",
        component: () => import("@/views/zkxUi/index"),
        meta: { title: "zkx组件", icon: "form" }
      }
    ]
  },
  {
    path: "/liquidfill",
    component: Layout,
    children: [
      {
        path: "index",
        name: "liquidfill",
        component: () => import("@/views/liquidfill/index"),
        meta: { title: "水球图", icon: "liquidfill" }
      }
    ]
  },
  {
    path: "/xgplayer",
    component: Layout,
    children: [
      {
        path: "index",
        name: "xgplayer",
        component: () => import("@/views/xgplayer/index"),
        meta: { title: "西瓜视频", icon: "video" }
      }
    ]
  },
  {
    path: "/qrcode",
    component: Layout,
    children: [
      {
        path: "index",
        name: "qrcode",
        component: () => import("@/views/qrcode/index"),
        meta: { title: "二维码", icon: "video" }
      }
    ]
  },
  {
    path: "/draggable",
    component: Layout,
    children: [
      {
        path: "index",
        name: "draggable",
        component: () => import("@/views/draggable/tab"),
        meta: { title: "拖拽", icon: "video" }
      }
    ]
  },
  {
    path: "/jinge",
    component: Layout,
    children: [
      {
        path: "index",
        name: "jinge",
        component: () => import("@/views/jinge/jinge"),
        meta: { title: "金格云", icon: "video" }
      }
    ]
  },
  {
    path: "/bpmn",
    component: Layout,
    children: [
      {
        path: "index",
        name: "bpmn",
        component: () => import("@/views/bpmn/index.vue"),
        meta: { title: "bpmn", icon: "video" }
      }
    ]
  },
  {
    path: "/jingeqianzhang",
    name: "jingeyun",
    component: () => import("@/views/jinge/jinge"),
    hidden: true
  },
  {
    path: "/csh5",
    name: "csh5",
    component: () => import("@/views/csh5/index"),
    hidden: true
  },
  {
    path: "/jsDom",

    component: Layout,
    children: [
      {
        path: "index",
        name: "jsDom",
        component: () => import("@/views/jsDom/index.vue"),
        meta: { title: "jsDom", icon: "video" }
      }
    ]
  },
  {
    path: "/fade",

    component: Layout,
    children: [
      {
        path: "index",
        name: "fade",
        component: () => import("@/views/fade/index.vue"),
        meta: { title: "fade", icon: "video" }
      }
    ]
  },
  {
    path: "/themeColor",

    component: Layout,
    children: [
      {
        path: "index",
        name: "themeColor",
        component: () => import("@/views/themeColor/index.vue"),
        meta: { title: "themeColor", icon: "video" }
      }
    ]
  },
  {
    path: "/keyvfor",

    component: Layout,
    children: [
      {
        path: "index",
        name: "keyvfor",
        component: () => import("@/views/key/index.vue"),
        meta: { title: "keyvfor", icon: "video" }
      }
    ]
  },
  {
    path: "/mapbox",

    component: Layout,
    children: [
      {
        path: "index",
        name: "mapbox",
        component: () => import("@/views/mapbox/index.vue"),
        meta: { title: "mapbox", icon: "video" }
      }
    ]
  },
  {
    path: "/require",

    component: Layout,
    children: [
      {
        path: "index",
        name: "require",
        component: () => import("@/views/require/index.vue"),
        meta: { title: "require", icon: "video" }
      }
    ]
  },
  {
    path: "/demicRoute",

    component: Layout,
    children: [
      {
        path: "index",
        name: "demicRoute",
        component: () => import("@/views/demicRoute/index.vue"),
        meta: { title: "demicRoute", icon: "video" }
      }
    ]
  },
  {
    path: "/dragYzm",
    component: Layout,
    children: [
      {
        path: "index",
        name: "dragYzm",
        component: () => import("@/views/dragYzm/index.vue"),
        meta: { title: "dragYzm", icon: "video" }
      }
    ]
  },
  {
    path: "/canvas",
    component: Layout,
    children: [
      {
        path: "index",
        name: "canvas",
        component: () => import("@/views/canvas/index.vue"),
        meta: { title: "canvas", icon: "video" }
      }
    ]
  },
  {
    path: "/arrayFn",
    component: Layout,
    children: [
      {
        path: "index",
        name: "arrayFn",
        component: () => import("@/views/arrayFn/index.vue"),
        meta: { title: "arrayFn", icon: "video" }
      }
    ]
  },
  {
    path: "/dragstart",
    component: Layout,
    children: [
      {
        path: "index",
        name: "dragstart",
        component: () => import("@/views/dragstart/index.vue"),
        meta: { title: "dragstart", icon: "video" }
      }
    ]
  },
  {
    path: "/wbs",
    component: Layout,
    children: [
      {
        path: "index",
        name: "wbs",
        component: () => import("@/views/wbs/index.vue"),
        meta: { title: "wbs", icon: "video" }
      }
    ]
  },
  {
    path: "/mouseMove",
    component: Layout,
    children: [
      {
        path: "index",
        name: "mouseMove",
        component: () => import("@/views/dragstart/mouseMove.vue"),
        meta: { title: "mouseMove", icon: "video" }
      }
    ]
  },
  {
    path: "/duoDIvDrag",
    component: Layout,
    children: [
      {
        path: "index",
        name: "duoDIvDrag",
        component: () => import("@/views/dragstart/duoDIvDrag.vue"),
        meta: { title: "duoDIvDrag", icon: "video" }
      }
    ]
  },
  {
    path: "/404",
    name: "error_404",
    component: () => import("@/views/404"),
    hidden: true
  },
  // 404 page must be placed at the end !!!
  { path: "*", redirect: "/404", hidden: true }
];
